package com.zsh.fmmall.dao;

import com.zsh.fmmall.entity.Category;
import com.zsh.fmmall.entity.CategoryVO;
import com.zsh.fmmall.general.GeneralDAO;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface CategoryMapper extends GeneralDAO<Category> {
    //1.连接查询：只查询一次，必须指定有多少分级
    public List<CategoryVO> selectAllCategories();

    //2.⼦查询：根据parentId查询⼦分类，不需要知道分级，有多少查多少
    public List<CategoryVO> selectAllCategories2(int parentId);

    //3、首页-分类商品推荐
    //查询一级类别
    public  List<CategoryVO> selectFirstLevelCategories();
}